function goToPage(pageIndex) {
    url_arr=window.location.href.split("?");
    params=[];
    for (var p in tplData.urlParams) {
        if(p!="page"){
            params.push(p+"="+tplData.urlParams[p]);
        }
    }
    params.push("page="+pageIndex);
    window.location.href= url_arr[0]+"?"+params.join("&");
}

MyJson = (function () {
    return {
        parse: function (str) {
            if (str == "") {
                return null;
            }
            return eval("(" + str + ")");
        },
        toString: function (o) {
            var r = [];
            if (typeof o == "string") return "\"" + o.replace(/([\'\"\\])/g, "\\$1").replace(/(\n)/g, "\\n").replace(/(\r)/g, "\\r").replace(/(\t)/g, "\\t") + "\"";
            if (typeof o == "undefined") return "undefined";
            if (typeof o == "object") {
                if (o === null) return "null";
                else if (!o.sort) {
                    for (var i in o)
                        r.push("\""+i+"\"" + ":" + MyJson.toString(o[i]))
                    r = "{" + r.join() + "}"
                } else {
                    for (var i = 0; i < o.length; i++)
                        r.push(MyJson.toString(o[i]))
                    r = "[" + r.join() + "]"
                }
                return r;
            }
            return o.toString();
        }
    }
})();